home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / bm / bm_mail1.geo / 00016.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  6.0 KB  |  294 lines

  1. on startMovie
  2.   sound stop 2
  3.   cursor([402, 403])
  4.   set the cursor of sprite 22 to [404, 405]
  5.   set the cursor of sprite 15 to [404, 405]
  6.   set the cursor of sprite 18 to [404, 405]
  7.   init()
  8.   loadTitle()
  9. end
  10.  
  11. on loadTitle
  12.   set the puppet of sprite 24 to 1
  13.   set the castNum of sprite 24 to the number of cast string("sub-" & Get_ScreenSubject())
  14.   updateStage()
  15. end
  16.  
  17. on init
  18.   Set_MaxLines(10)
  19.   Set_WhichText(field ("LIST" & Get_ScreenSubject()))
  20.   Set_FieldScroll(the number of cast "currScroll")
  21.   Set_NumOflines(the number of lines in Get_WhichText())
  22.   set the textHeight of field Get_FieldScroll() to 14
  23.   Set_SliderSprite(10)
  24.   Set_ThumbSprite(11)
  25.   Set_CurrPlace(0)
  26.   Set_ConstraintSprite(14)
  27.   Set_DisableSprite(18)
  28.   Set_HiliteSprite(20)
  29.   Set_SizeOfLine(14)
  30.   Set_TopField(the top of sprite 15)
  31.   Set_SelectedLine(EMPTY)
  32.   puppetSprite(Get_HiliteSprite(), 1)
  33.   puppetSprite(Get_ThumbSprite(), 1)
  34.   set the immediate of sprite Get_ThumbSprite() to 1
  35.   Set_SliderHeight(the height of sprite Get_ConstraintSprite())
  36.   Set_Options(Get_NumOflines() - Get_MaxLines())
  37.   set the visible of sprite Get_DisableSprite() to not (Get_Options() > 0)
  38.   if Get_Options() > 0 then
  39.     Set_Increment(1.0 * Get_SliderHeight() / Get_Options())
  40.   else
  41.     set the cursor of sprite 18 to [400, 401]
  42.   end if
  43.   Set_TopLoc(the top of sprite Get_ConstraintSprite())
  44.   PlaceSlider()
  45. end
  46.  
  47. on ChooseLine
  48.   set TopLoc to Get_TopField()
  49.   set VerticalLoc to getAt(the clickLoc, 2)
  50.   set NumOfline to (VerticalLoc - TopLoc) / Get_SizeOfLine()
  51.   if (NumOfline + 1) <= Get_NumOflines() then
  52.     set newLoc to (NumOfline * Get_SizeOfLine()) + TopLoc
  53.     set the locV of sprite Get_HiliteSprite() to newLoc
  54.     Set_SelectedLine(Get_CurrPlace() + NumOfline + 1)
  55.     updateStage()
  56.     tell the stage
  57.       openSubMenuWindow()
  58.     end tell
  59.   end if
  60. end
  61.  
  62. on UpdateHilight
  63.   if (Get_SelectedLine() <> EMPTY) and (Get_SelectedLine() > Get_CurrPlace()) and ((Get_SelectedLine() - 1) < (Get_CurrPlace() + Get_MaxLines())) then
  64.     set TopLoc to Get_TopField()
  65.     set newLoc to ((Get_SelectedLine() - Get_CurrPlace() - 1) * Get_SizeOfLine()) + TopLoc
  66.     set the locV of sprite Get_HiliteSprite() to newLoc
  67.   else
  68.     set the locV of sprite Get_HiliteSprite() to 999
  69.   end if
  70.   updateStage()
  71. end
  72.  
  73. on SliderActive
  74.   repeat while the stillDown
  75.     if rollOver(16) then
  76.       set newV to constrainV(Get_ConstraintSprite(), mouseV())
  77.       set the locV of sprite Get_ThumbSprite() to newV
  78.       set newValue to integer((newV - Get_TopLoc()) / Get_Increment())
  79.       Set_CurrPlace(newValue)
  80.       UpdateHilight()
  81.       put line Get_CurrPlace() + 1 to Get_CurrPlace() + Get_MaxLines() of Get_WhichText() into field Get_FieldScroll()
  82.     end if
  83.   end repeat
  84. end
  85.  
  86. on PlaceSlider
  87.   set currentValue to Get_CurrPlace()
  88.   if Get_Options() > 0 then
  89.     set newPlace to Get_TopLoc() + integer(Get_Increment() * currentValue)
  90.     set the locV of sprite Get_ThumbSprite() to newPlace
  91.     updateStage()
  92.   end if
  93.   UpdateHilight()
  94.   put line Get_CurrPlace() + 1 to Get_CurrPlace() + Get_MaxLines() of Get_WhichText() into field Get_FieldScroll()
  95. end
  96.  
  97. on ClickSlider toSub
  98.   if not toSub then
  99.     Set_CurrPlace(Get_CurrPlace() - Get_MaxLines() + 1)
  100.   else
  101.     Set_CurrPlace(Get_CurrPlace() + Get_MaxLines() - 1)
  102.   end if
  103.   if Get_CurrPlace() < 0 then
  104.     Set_CurrPlace(0)
  105.   else
  106.     if (Get_CurrPlace() + Get_MaxLines()) > Get_NumOflines() then
  107.       Set_CurrPlace(Get_NumOflines() - Get_MaxLines())
  108.     end if
  109.   end if
  110.   PlaceSlider()
  111. end
  112.  
  113. on Set_StepMeter direction
  114.   set currentValue to Get_CurrPlace()
  115.   if (direction = "increase") and (currentValue <> Get_Options()) then
  116.     Set_CurrPlace(currentValue + 1)
  117.   else
  118.     if (direction = "decrease") and (currentValue <> 0) then
  119.       Set_CurrPlace(currentValue - 1)
  120.     end if
  121.   end if
  122.   PlaceSlider()
  123. end
  124.  
  125. on Set_SliderSprite int
  126.   global SliderSprite
  127.   set SliderSprite to int
  128. end
  129.  
  130. on Get_SliderSprite
  131.   global SliderSprite
  132.   return SliderSprite
  133. end
  134.  
  135. on Set_ThumbSprite int
  136.   global ThumbSprite
  137.   set ThumbSprite to int
  138. end
  139.  
  140. on Get_ThumbSprite
  141.   global ThumbSprite
  142.   return ThumbSprite
  143. end
  144.  
  145. on Set_CurrPlace int
  146.   global CurrPlace
  147.   set CurrPlace to int
  148. end
  149.  
  150. on Get_CurrPlace
  151.   global CurrPlace
  152.   return CurrPlace
  153. end
  154.  
  155. on Set_SliderHeight int
  156.   global SliderHeight
  157.   set SliderHeight to int
  158. end
  159.  
  160. on Get_SliderHeight
  161.   global SliderHeight
  162.   return SliderHeight
  163. end
  164.  
  165. on Set_Increment int
  166.   global Increment
  167.   set Increment to int
  168. end
  169.  
  170. on Get_Increment
  171.   global Increment
  172.   return Increment
  173. end
  174.  
  175. on Set_TopLoc int
  176.   global TopLoc
  177.   set TopLoc to int
  178. end
  179.  
  180. on Get_TopLoc
  181.   global TopLoc
  182.   return TopLoc
  183. end
  184.  
  185. on Set_Options int
  186.   global options
  187.   set options to int
  188. end
  189.  
  190. on Get_Options
  191.   global options
  192.   return options
  193. end
  194.  
  195. on Set_MaxLines int
  196.   global MaxLines
  197.   set MaxLines to int
  198. end
  199.  
  200. on Get_MaxLines
  201.   global MaxLines
  202.   return MaxLines
  203. end
  204.  
  205. on Set_WhichText str
  206.   global WhichText
  207.   set WhichText to str
  208. end
  209.  
  210. on Get_WhichText
  211.   global WhichText
  212.   return WhichText
  213. end
  214.  
  215. on Set_FieldScroll int
  216.   global FieldScroll
  217.   set FieldScroll to int
  218. end
  219.  
  220. on Get_FieldScroll
  221.   global FieldScroll
  222.   return FieldScroll
  223. end
  224.  
  225. on Set_NumOflines int
  226.   global numOfLines
  227.   set numOfLines to int
  228. end
  229.  
  230. on Get_NumOflines
  231.   global numOfLines
  232.   return numOfLines
  233. end
  234.  
  235. on Set_ConstraintSprite int
  236.   global ConstraintSprite
  237.   set ConstraintSprite to int
  238. end
  239.  
  240. on Get_ConstraintSprite
  241.   global ConstraintSprite
  242.   return ConstraintSprite
  243. end
  244.  
  245. on Set_DisableSprite int
  246.   global DisableSprite
  247.   set DisableSprite to int
  248. end
  249.  
  250. on Get_DisableSprite
  251.   global DisableSprite
  252.   return DisableSprite
  253. end
  254.  
  255. on Set_HiliteSprite int
  256.   global HiliteSprite
  257.   set HiliteSprite to int
  258. end
  259.  
  260. on Get_HiliteSprite
  261.   global HiliteSprite
  262.   return HiliteSprite
  263. end
  264.  
  265. on Set_SizeOfLine int
  266.   global SizeOfLine
  267.   set SizeOfLine to int
  268. end
  269.  
  270. on Get_SizeOfLine
  271.   global SizeOfLine
  272.   return SizeOfLine
  273. end
  274.  
  275. on Set_SelectedLine int
  276.   global SelectedLine
  277.   set SelectedLine to int
  278. end
  279.  
  280. on Get_SelectedLine
  281.   global SelectedLine
  282.   return SelectedLine
  283. end
  284.  
  285. on Set_TopField int
  286.   global TopField
  287.   set TopField to int
  288. end
  289.  
  290. on Get_TopField
  291.   global TopField
  292.   return TopField
  293. end
  294.